package com.asia5b.a5mall.member.adapter

import com.asia5b.a5mall.middleware.utils.WTimeUtils
import com.asia5b.a5mall.member.R
import com.asia5b.a5mall.middleware.model.member.PointModel
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class PointListAdapter(list:ArrayList<PointModel>):
BaseQuickAdapter<PointModel,BaseViewHolder>(R.layout.item_pointlist_adapter,list){
    override fun convert(helper: BaseViewHolder, item: PointModel) {

        //内容
        helper.setText(R.id.tv_pointlist_content,item.reason)

        //时间
        val time= WTimeUtils.format("${item.time*1000}", WTimeUtils.text_yyyy_MM_dd_HH_mm_ss)
        helper.setText(R.id.tv_pointlist_time,time)

        //积分
        helper.setText(R.id.tv_pointlist_point,"+${item.grade_point}")
    }
}